package org.example.domain;

import java.io.Serializable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    /**
     * ID
     */
    @NotNull(message = "ID不能为null")
    private Long id;

    /**
     * 用户名
     */
    @Size(max = 30, message = "用户名最大长度要小于 30")
    private String username;

    /**
     * 密码
     */
    @Size(max = 60, message = "密码最大长度要小于 60")
    private String password;

    /**
     * 邮箱
     */
    @Size(max = 255, message = "邮箱最大长度要小于 255")
    private String email;

    private static final long serialVersionUID = 1L;
}